package com.design.pattern.structure.conposite.demo.safe;

public class Test {
    public static void main(String[] args) {
        System.out.println("==============安全模式=========");
        File qq = new File("QQ.exe");
        File wx = new File("微信.exe");
        File ppt = new File("ppt.exe");
        File word = new File("word.exe");
        File execl = new File("execl.exe");
        Folder offic = new Folder("办公软件", 2);
        offic.add(execl);
        offic.add(word);
        offic.add(ppt);

        Folder root = new Folder("D盘", 1);
        root.add(wx);
        root.add(qq);
        root.add(offic);
        System.out.println("=========show写法===========");
        root.show();
        System.out.println("=========list写法===========");
        root.list(); //最小知道

    }
}
